package sgi.client;


import javax.swing.JFrame;
import java.awt.GridBagLayout;
import javax.swing.JLabel;
import java.awt.GridBagConstraints;
import java.awt.Insets;
import java.sql.SQLException;

import javax.swing.JFrame;
import javax.swing.JLabel;

import com.sun.rowset.CachedRowSetImpl;

public class MonthlyImagepackSubReportPanel extends JFrame {

	public MonthlyImagepackSubReportPanel(CachedRowSetImpl reportInfo) throws SQLException {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		reportInfo.next();
		setTitle("SGI Imagepack Subscriptions Report");
		GridBagLayout gridBagLayout = new GridBagLayout();
		gridBagLayout.columnWidths = new int[]{0, 0, 0, 0, 0};
		gridBagLayout.rowHeights = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
		gridBagLayout.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		gridBagLayout.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		getContentPane().setLayout(gridBagLayout);
		
		JLabel lblDate = new JLabel("Date: ");
		GridBagConstraints gbc_lblDate = new GridBagConstraints();
		gbc_lblDate.insets = new Insets(0, 0, 5, 5);
		gbc_lblDate.gridx = 1;
		gbc_lblDate.gridy = 1;
		getContentPane().add(lblDate, gbc_lblDate);
		
		JLabel lblAdate = new JLabel("aDate");
		if (reportInfo != null)
			lblAdate.setText(reportInfo.getString(1));
		GridBagConstraints gbc_lblAdate = new GridBagConstraints();
		gbc_lblAdate.insets = new Insets(0, 0, 5, 5);
		gbc_lblAdate.gridx = 2;
		gbc_lblAdate.gridy = 1;
		getContentPane().add(lblAdate, gbc_lblAdate);
		
		JLabel lblDatetimeSubs = new JLabel("Date/Time Subs: ");
		GridBagConstraints gbc_lblDatetimeSubs = new GridBagConstraints();
		gbc_lblDatetimeSubs.insets = new Insets(0, 0, 5, 5);
		gbc_lblDatetimeSubs.gridx = 2;
		gbc_lblDatetimeSubs.gridy = 4;
		getContentPane().add(lblDatetimeSubs, gbc_lblDatetimeSubs);
		
		JLabel lblAdatetimesubs = new JLabel("aDatetimeSubs");
		if (reportInfo != null)
			lblAdatetimesubs.setText(reportInfo.getString(2));
		GridBagConstraints gbc_lblAdatetimesubs = new GridBagConstraints();
		gbc_lblAdatetimesubs.insets = new Insets(0, 0, 5, 0);
		gbc_lblAdatetimesubs.gridx = 3;
		gbc_lblAdatetimesubs.gridy = 4;
		getContentPane().add(lblAdatetimesubs, gbc_lblAdatetimesubs);
		
		JLabel lblDatalayerSubs = new JLabel("Datalayer Subs: ");
		GridBagConstraints gbc_lblDatalayerSubs = new GridBagConstraints();
		gbc_lblDatalayerSubs.insets = new Insets(0, 0, 5, 5);
		gbc_lblDatalayerSubs.gridx = 2;
		gbc_lblDatalayerSubs.gridy = 6;
		getContentPane().add(lblDatalayerSubs, gbc_lblDatalayerSubs);
		
		JLabel lblAdatalayersubs = new JLabel("aDatalayerSubs");
		if (reportInfo != null)
			lblAdatalayersubs.setText(reportInfo.getString(3));
		GridBagConstraints gbc_lblAdatalayersubs = new GridBagConstraints();
		gbc_lblAdatalayersubs.insets = new Insets(0, 0, 5, 0);
		gbc_lblAdatalayersubs.gridx = 3;
		gbc_lblAdatalayersubs.gridy = 6;
		getContentPane().add(lblAdatalayersubs, gbc_lblAdatalayersubs);
		
		JLabel lblImagepackSubs = new JLabel("Imagepack Subs:");
		GridBagConstraints gbc_lblImagepackSubs = new GridBagConstraints();
		gbc_lblImagepackSubs.insets = new Insets(0, 0, 5, 5);
		gbc_lblImagepackSubs.gridx = 2;
		gbc_lblImagepackSubs.gridy = 8;
		getContentPane().add(lblImagepackSubs, gbc_lblImagepackSubs);
		
		JLabel lblAimagepacksubs = new JLabel("aImagepackSubs");
		if (reportInfo != null)
			lblAdatalayersubs.setText(reportInfo.getString(4));
		GridBagConstraints gbc_lblAimagepacksubs = new GridBagConstraints();
		gbc_lblAimagepacksubs.insets = new Insets(0, 0, 5, 0);
		gbc_lblAimagepacksubs.gridx = 3;
		gbc_lblAimagepacksubs.gridy = 8;
		getContentPane().add(lblAimagepacksubs, gbc_lblAimagepacksubs);
		
		JLabel lblAverageImagepackUsage = new JLabel("Average Imagepack Usage: ");
		GridBagConstraints gbc_lblAverageImagepackUsage = new GridBagConstraints();
		gbc_lblAverageImagepackUsage.insets = new Insets(0, 0, 0, 5);
		gbc_lblAverageImagepackUsage.gridx = 2;
		gbc_lblAverageImagepackUsage.gridy = 10;
		getContentPane().add(lblAverageImagepackUsage, gbc_lblAverageImagepackUsage);
		
		JLabel lblAavgimagepackuse = new JLabel("aAvgImagepackUse");
		GridBagConstraints gbc_lblAavgimagepackuse = new GridBagConstraints();
		gbc_lblAavgimagepackuse.gridx = 3;
		gbc_lblAavgimagepackuse.gridy = 10;
		getContentPane().add(lblAavgimagepackuse, gbc_lblAavgimagepackuse);
		
		
	}

}
